import fetch from 'utils/fetch';
import store from '../store';
export function page(query) {
  return fetch({
    url: '/api/category/page',
    method: 'get',
    params: query
  });
}

export function save(data) {
  var token = store.getters.token;
  var json = JSON.parse(token)
  data.companyId = json.companyId
  return fetch({
    url: '/api/category/save',
    method: 'post',
    data
  })
}

export function del(data) {
  return fetch({
    url: '/api/category/del',
    method: 'post',
    data
  })
}